
"""快速排序"""
def quick_sort(lst):
    if len(lst) <= 1:
        return lst
    else:
        less = []
        mid = []
        more = []
        for i in range(0,len(lst)):
            if lst[i]<lst[0]:
                less.append(lst[i])
            elif lst[i]>lst[0]:
                more.append(lst[i])
            else:
                mid.append(lst[i])
        return quick_sort(less)+mid+quick_sort(more)


if __name__ == '__main__':
    lst = [90, 89, 66, 88, 72, 39, 100, 65]
    print(quick_sort(lst))



